import moment from './moment';

// 系统-代办通知
export const systemToDoShortcuts = [
    {
        text: "昨天",
        onClick(picker) {
            const start = moment()
                .day(moment().day() - 1)
                .format("YYYY-MM-DD");
            const end = moment()
                .day(moment().day() - 1)
                .format("YYYY-MM-DD");
            picker.$emit("pick", [start, end]);
        },
    }, {
        text: "今日",
        onClick(picker) {
            const end = moment().format("YYYY-MM-DD");
            picker.$emit("pick", [end, end]);
        }
    }, {
        text: "明天",
        onClick(picker) {
            const start = moment()
                .day(moment().day() + 1)
                .format("YYYY-MM-DD");
            const end = moment()
                .day(moment().day() + 1)
                .format("YYYY-MM-DD");
            picker.$emit("pick", [start, end]);
        }
    },
    {
        text: "后天",
        onClick(picker) {
            const end = moment()
                .day(moment().day() + 2)
                .format("YYYY-MM-DD");
            const start = moment()
                .day(moment().day() + 2)
                .format("YYYY-MM-DD");
            picker.$emit("pick", [start, end]);
        }
    }
]